package a.f.a;

import a.a.kb;
import a.c.ab;
import a.c.v;
import a.c.x;
import a.c.z;
import a.d.p;
import a.d.t;
import a.f.g.a.*;
import a.f.g.k;
import a.f.m.a;
import a.f.wc;
import a.i.wb;

import java.awt.geom.Rectangle2D;
import java.util.Comparator;
import java.util.Iterator;

class f
  extends e
{
  private static final int N = 5;
  private x O;
  private x P;
  private a.c.bb Q;
  private kc R;
  private int S;
  private double T;
  private a.c.bb U;
  private boolean V = false;
  private a.c.bb W = new a.c.bb();
  
  public boolean A()
  {
    return this.V;
  }
  
  public void j(boolean paramBoolean)
  {
    this.V = paramBoolean;
  }
  
  public a.c.bb B()
  {
    return this.W;
  }
  
  public void a(a.c.bb parambb)
  {
    this.Q = parambb;
  }
  
  public void a(a.f.g.a.d paramd, long paramLong)
  {
    ((eb)paramd.T()).a(paramLong);
  }
  
  double a(a.c.w paramw, double paramDouble)
  {
    int j = e.M;
    this.T = Math.max(this.F / 6.283185307179586D, paramDouble);
    if (j == 0) {
      if (this.Q == null) {
        this.Q = new a.c.bb();
      }
    }
    int i = Math.max(this.Q.size(), (int)(4.0D * (Math.sqrt(this.w.j()) - 1.0D) + 1.0D));
    this.S = this.w.j();
    this.U = new a.c.bb(paramw);
    if (j == 0)
    {
      if (this.w.j() > 8) {
        if (j != 0) {
          break label177;
        }
      }
    }
    else {
      if (this.w.j() > i - 1) {
        break label176;
      }
    }
    double d = 3.141592653589793D / this.w.j();
    a(d);
    this.W = this.U;
    return super.a(this.U.l(), paramDouble);
    label176:
    label177:
    this.O = this.w.B();
    a.f.g.a.d locald = new a.f.g.a.d(false);
    a.f.g.a.o localo = new a.f.g.a.o();
    locald.a(localo);
    locald.i(true);
    long l = Math.max((1000.0D * Math.pow(this.w.j() - this.W.size(), 0.75D)), 500L);
    eb localeb = new eb();
    localeb.a(l);
    localeb.a(0.05D);
    localeb.b(0.03D);
    locald.a(localeb);
    locald.a(new c_());
    locald.a(new g_());
    if (j == 0) {
      if (this.V)
      {
        d = a(locald, localo);
        if (j != 0) {
          break label392;
        }
        if (!e.L) {
          break label364;
        }
      }
    }
    d = a(locald, paramDouble, i, localo);
    label364:
    d = a(locald, d, localo, this.z);
    this.w.a(this.O);
    label392:
    return d;
  }
  
  private double a(a.f.g.a.d paramd, a.f.g.a.o paramo)
  {
    int i = e.M;
    boolean bool = e.L;
    if ((i != 0) || (!this.G))
    {
      this.W = new a.c.bb();
      localObject1 = new ab();
      if ((i != 0) || (!a.a.l.d(this.w))) {
        localObject1 = a.a.m.b(this.w);
      }
      localObject2 = new a.f.g.f();
      ((a.f.g.f)localObject2).d(0.3D);
      ((a.f.g.f)localObject2).n(true);
      ((a.f.g.f)localObject2).m(true);
      ((a.f.g.f)localObject2).c(0.5D);
      ((a.f.g.f)localObject2).e(this.z);
      ((a.f.g.f)localObject2).g(this.z);
      ((a.f.g.f)localObject2).q();
      ((a.f.g.f)localObject2).doLayout(this.w);
      if (i == 0) {
        if (((ab)localObject1).size() > 0)
        {
          a.c.m localm = ((ab)localObject1).l();
          do
          {
            if (!localm.e()) {
              break;
            }
            a.c.d locald = localm.a();
            this.w.a(locald);
            localm.f();
            if ((i == 0) && (bool)) {
              break label256;
            }
          } while (!bool);
        }
      }
      if ((i == 0) && ((i != 0) || (!this.A)))
      {
        double d1 = D();
        a locala = new a();
        locala.b(this.y / d1);
        locala.a(this.w);
      }
    }
    label256:
    Object localObject1 = new j();
    ((j)localObject1).a(this.O);
    ((j)localObject1).a(this.A);
    Object localObject2 = wc.a(this.w, this.w.v());
    a.d.w localw = new a.d.w(((Rectangle2D)localObject2).getCenterX(), ((Rectangle2D)localObject2).getCenterY());
    double d2 = localw.a();
    double d3 = localw.b();
    a.c.w localw1 = this.w.v();
    do
    {
      do
      {
        if (!localw1.e()) {
          break;
        }
        a.c.e locale = localw1.d();
        this.w.d(locale, -d2, -d3);
        localw1.f();
        if ((i == 0) && (bool)) {
          break label434;
        }
      } while (!bool);
    } while (i != 0);
    if (i == 0)
    {
      if (!this.G)
      {
        ((j)localObject1).a(this.D);
        ((j)localObject1).b(false);
      }
    }
    else
    {
      if (i != 0) {
        break label492;
      }
      if (!bool) {
        break label483;
      }
    }
    label434:
    double d4 = ((Rectangle2D)localObject2).getHeight() / 2.0D;
    double d5 = ((Rectangle2D)localObject2).getWidth() / 2.0D;
    double d6 = Math.sqrt(d4 * d4 + d5 * d5);
    ((j)localObject1).a(d6);
    ((j)localObject1).b(false);
    label483:
    if (i == 0)
    {
      if (!this.A) {
        label492:
        ((j)localObject1).b(this.y);
      }
      ((j)localObject1).doLayout(this.w);
    }
    this.W = ((j)localObject1).d();
    return ((j)localObject1).e();
  }
  
  private double a(a.f.g.a.d paramd, double paramDouble, int paramInt, a.f.g.a.o paramo)
  {
    int i = e.M;
    this.P = this.w.B();
    a.a.y localy = y();
    if (i == 0) {
      if ((this.G) && ((localy instanceof e.a_)))
      {
        G();
        a.c.e locale1 = this.W.m();
        double d3 = ((e.a_)localy).a().a();
        double d5 = ((e.a_)localy).a().b();
        d6 = Math.atan2(this.w.n(locale1) - d5, this.w.m(locale1) - d3);
        a(d6);
        d1 = super.a(this.W.l(), paramDouble);
        if (i != 0) {
          break label231;
        }
        if (!e.L) {
          break label193;
        }
      }
    }
    a(paramInt, this.w.j());
    double d2 = 3.141592653589793D / this.W.l().k();
    a(d2);
    double d1 = super.a(this.W.l(), paramDouble);
    label193:
    F();
    this.R = new h_();
    this.R.b(d1);
    this.R.a(0.2D * d1);
    label231:
    ob localob = new ob(this.R, ob.e, 0.0D, 1.0D);
    localob.c(1.0D);
    localob.a(ob.d);
    paramd.a(localob);
    f_ localf_ = new f_();
    paramd.f(localf_);
    localf_.b(d1);
    localf_.a(0.2D * d1);
    paramd.b(this.z);
    paramd.a(this.z);
    paramo.a(2.0D);
    paramd.a(this.w);
    paramd.h(localf_);
    paramd.c(localob);
    this.w.a(this.P);
    d1 = D();
    double d4 = Math.max(this.D / 2.0D, this.z);
    a(d1, d4);
    C();
    a.c.e locale2 = this.W.m();
    double d6 = Math.atan2(this.w.n(locale2), this.w.m(locale2));
    a(d6);
    d1 = super.a(this.W.l(), d1);
    return d1;
  }
  
  private double a(a.f.g.a.d paramd, double paramDouble1, a.f.g.a.o paramo, double paramDouble2)
  {
    int j = e.M;
    boolean bool = e.L;
    if (j == 0) {
      if (this.A)
      {
        if (j != 0) {
          break label51;
        }
        if (this.G) {
          paramDouble1 = Math.max(paramDouble1, this.F / 6.283185307179586D);
        }
      }
    }
    label51:
    if ((j != 0) || ((this.A) && ((j != 0) || (paramDouble1 > this.T))))
    {
      double d1 = this.T / paramDouble1;
      a locala = new a();
      locala.b(d1);
      locala.i(false);
      locala.a(this.w);
      paramDouble1 = this.T;
    }
    paramo.g(3.0D);
    paramd.a(paramDouble2);
    paramd.b(paramDouble2);
    ob localob1 = new ob(new zb(), ob.b, 0.0D, Math.max(paramDouble2, this.D));
    ((zb)localob1.f()).a(paramDouble2);
    localob1.c(0.25D);
    localob1.a(ob.k);
    paramd.a(localob1);
    this.R = new kc();
    double d2 = Math.max(paramDouble2 / 2.0D, this.D / 2.0D);
    this.R.b(paramDouble1 - d2);
    this.R.a(d2);
    ob localob2 = new ob(this.R, ob.e, 0.0D, 1.0D);
    paramd.a(localob2);
    localob2.c(1.0D);
    long l;
    if ((j != 0) || ((this.A) && (!this.V)))
    {
      l = paramd.B().g();
      if (j != 0) {
        break label373;
      }
      if (!bool) {}
    }
    else
    {
      l = (1000.0D * Math.pow(this.w.j() - this.W.size(), 0.75D));
    }
    a(paramd, Math.max(200L, l));
    paramd.a(this.w);
    if (this.A)
    {
      label373:
      wb localwb = new wb(42L);
      k localk = new k(localwb, paramDouble2);
      localk.doLayout(this.w);
    }
    double d3 = paramDouble1;
    paramDouble1 = D();
    a(paramDouble1, this.D / 2.0D);
    a.c.e locale = this.W.m();
    double d4 = Math.atan2(this.w.n(locale), this.w.m(locale));
    if (j == 0)
    {
      if (this.A)
      {
        a(d4);
        if (j != 0) {
          break label523;
        }
        paramDouble1 = super.a(this.W.l(), paramDouble1);
        if (!bool) {}
      }
      else
      {
        a(d4);
      }
    }
    else {
      super.c(this.W.l(), 0.0D);
    }
    label523:
    double d5 = 0.0D;
    a.c.w localw = this.W.l();
    do
    {
      if (!localw.e()) {
        break;
      }
      t localt = this.w.v(localw.d());
      d5 = Math.max(d5, localt.c());
      if (j == 0)
      {
        if (bool) {
          break label618;
        }
        d5 = Math.max(d5, localt.b());
        localw.f();
      }
    } while (!bool);
    if (j == 0) {}
    label618:
    double d6 = (paramDouble1 - d5) / d3;
    if (j == 0) {
      if (d6 > 1.0D) {
        f(d6);
      }
    }
    if ((j != 0) || (this.A))
    {
      z localz = b(this.w.v(), paramDouble2);
      a(localz, paramDouble2);
      d3 = paramDouble1;
      double d7 = Math.max(d5 / 5.0D, 5.0D);
      int i = 0;
      do
      {
        if ((localz.isEmpty()) || (i++ >= 5)) {
          break;
        }
        double d8 = d3 + d7;
        e(d8 / d3);
        a(localz, paramDouble2);
        d3 = d8;
      } while (!bool);
    }
    return paramDouble1;
  }
  
  private void e(double paramDouble)
  {
    boolean bool = e.L;
    a.c.w localw = this.w.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      double d1 = this.w.m(locale);
      double d2 = this.w.n(locale);
      this.w.a(locale, d1 * paramDouble, d2 * paramDouble);
      localw.f();
    } while (!bool);
  }
  
  private static t a(t paramt, double paramDouble)
  {
    return new t(paramt.d() - paramDouble, paramt.e() - paramDouble, paramt.b() + 2.0D * paramDouble, paramt.c() + 2.0D * paramDouble);
  }
  
  private void a(z paramz, double paramDouble)
  {
    int i = e.M;
    boolean bool = e.L;
    a.c.y localy = paramz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      e_ locale_ = (e_)localy.j();
      if (i == 0)
      {
        if (!locale_.a(paramDouble)) {
          paramz.b(localy);
        }
        localy.f();
      }
    } while (!bool);
  }
  
  private z b(a.c.w paramw, double paramDouble)
  {
    boolean bool = e.L;
    z localz = new z();
    double d = paramDouble * 0.5D;
    do
    {
      if (!paramw.e()) {
        break;
      }
      localObject = paramw.d();
      localz.add(new b_((a.c.e)localObject, a(this.w.v((a.c.e)localObject), d)));
      paramw.f();
    } while (!bool);
    Object localObject = new d_();
    a.d.m.a(localz, (m.g_)localObject);
    return ((d_)localObject).a();
  }
  
  private void a(int paramInt1, int paramInt2)
  {
    int i3 = e.M;
    boolean bool2 = e.L;
    x localx = this.w.B();
    int i = this.w.j();
    if ((i3 != 0) || (this.Q != null))
    {
      localObject1 = this.Q.iterator();
      do
      {
        if (!((Iterator)localObject1).hasNext()) {
          break;
        }
        localObject2 = (a.c.e)((Iterator)localObject1).next();
        if (i3 == 0)
        {
          if (bool2) {
            break label98;
          }
          this.O.a(localObject2, true);
        }
      } while (!bool2);
    }
    label98:
    Object localObject1 = this.U.p();
    Object localObject2 = this.w.B();
    int j = 0;
    a.c.w localw = this.U.l();
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        ((x)localObject2).a(locale, j);
        localw.f();
        j++;
      } while (!bool2);
    } while (i3 != 0);
    boolean bool1 = kb.e(this.w);
    int k = 0;
    label286:
    Object localObject5;
    label411:
    label426:
    label431:
    do
    {
      if (k >= localObject1.length) {
        break;
      }
      Object localObject3 = localObject1[k];
      if (bool2) {
        break label452;
      }
      if (this.O.getBool(localObject3))
      {
        localx.a(localObject3, -1);
        if (i3 != 0) {
          continue;
        }
        if (!bool2) {}
      }
      else
      {
        if (i3 == 0) {
          if (bool1)
          {
            if (i3 != 0) {
              break label286;
            }
            if (localObject3.c() != 1) {}
          }
        }
        int n;
        do
        {
          localx.a(localObject3, 0);
          if (i3 != 0) {
            break label431;
          }
          if (!bool2) {
            break label426;
          }
          n = 0;
          localObject5 = localObject3.l();
          do
          {
            if (!((a.c.m)localObject5).e()) {
              break label411;
            }
            a.c.d locald = ((a.c.m)localObject5).a();
            int i1 = ((x)localObject2).getInt(locald.a(localObject3));
            if (bool2) {
              break;
            }
            int i2;
            if (k > i1)
            {
              i2 = Math.min(k - i1, i1 + i - k) - 1;
              if (i3 != 0) {
                continue;
              }
              if (!bool2) {}
            }
            else
            {
              i2 = Math.min(i1 - k, i + k - i1) - 1;
            }
            n += i2;
            ((a.c.m)localObject5).f();
          } while (!bool2);
        } while (i3 != 0);
        localx.a(localObject3, n);
      }
      k++;
    } while (!bool2);
    a.i.l.a((Object[])localObject1, a.i.l.e(localx));
    if (i3 == 0) {
      k = 0;
    }
    label452:
    int m = 0;
    do
    {
      if (m >= paramInt2) {
        break;
      }
      localObject4 = localObject1[m];
      if (i3 == 0)
      {
        if (k >= paramInt1)
        {
          if (i3 != 0) {
            continue;
          }
          if (localx.getInt(localObject4) > 0) {}
        }
        else
        {
          this.O.a(localObject4, true);
        }
      }
      else {
        k++;
      }
      m++;
    } while (!bool2);
    a.c.bb localbb = new a.c.bb();
    Object localObject4 = this.U.l();
    do
    {
      if (!((a.c.w)localObject4).e()) {
        break;
      }
      localObject5 = ((a.c.w)localObject4).d();
      if (i3 != 0) {
        break label617;
      }
      if (bool2) {
        break label616;
      }
      if (this.O.getBool(localObject5)) {
        localbb.add(localObject5);
      }
      ((a.c.w)localObject4).f();
    } while (!bool2);
    this.W = localbb;
    if (i3 == 0)
    {
      label616:
      if (this.W.size() <= paramInt2) {
        label617:
        C();
      }
      this.w.a(localx);
    }
    this.w.a((x)localObject2);
  }
  
  private void C()
  {
    int j = e.M;
    boolean bool = e.L;
    if (j == 0) {
      if (this.W.size() >= this.S) {
        return;
      }
    }
    a.c.bb localbb1 = new a.c.bb();
    a.c.w localw = this.w.v();
    Object localObject1;
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject1 = localw.d();
      if (bool) {
        break label98;
      }
      if (!this.O.getBool(localObject1)) {
        localbb1.add(localObject1);
      }
      localw.f();
    } while (!bool);
    label98:
    label378:
    label381:
    do
    {
      int i = 0;
      localObject1 = localbb1.l();
      do
      {
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break label405;
          }
          a.c.e locale1 = ((a.c.w)localObject1).d();
          a.c.bb localbb2 = new a.c.bb();
          if (bool) {
            break;
          }
          Object localObject2 = locale1.o();
          a.c.e locale2;
          do
          {
            if (!((a.c.w)localObject2).e()) {
              break;
            }
            locale2 = ((a.c.w)localObject2).d();
            if (j != 0) {
              break label216;
            }
            if (bool) {
              break label215;
            }
            if (this.O.getBool(locale2)) {
              localbb2.add(locale2);
            }
            ((a.c.w)localObject2).f();
          } while (!bool);
          if (j == 0)
          {
            if (j != 0) {
              break label390;
            }
            if (localbb2.size() == 2)
            {
              localObject2 = localbb2.m();
              locale2 = localbb2.n();
              v localv1 = this.W.d(localObject2);
              v localv2 = this.W.d(locale2);
              if (j == 0)
              {
                if (this.W.e(localv1) == localv2)
                {
                  this.W.b(locale1, localv1);
                  this.O.a(locale1, true);
                  localbb1.remove(locale1);
                  i = 1;
                  if (j != 0) {
                    break label381;
                  }
                  if (!bool) {}
                }
                else
                {
                  if (j != 0) {
                    break label378;
                  }
                }
              }
              else if (this.W.e(localv2) == localv1)
              {
                this.W.b(locale1, localv2);
                this.O.a(locale1, true);
                localbb1.remove(locale1);
                i = 1;
              }
            }
          }
          if (j == 0)
          {
            if (this.W.size() >= this.S) {
              return;
            }
            ((a.c.w)localObject1).f();
          }
        } while (!bool);
      } while (j != 0);
    } while (i != 0);
    label215:
    label216:
    return;
  }
  
  private void f(double paramDouble)
  {
    int i = e.M;
    boolean bool = e.L;
    a.c.w localw = this.w.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (i == 0)
      {
        if (!this.O.getBool(locale))
        {
          double d1 = this.w.m(locale);
          double d2 = this.w.n(locale);
          this.w.a(locale, d1 * paramDouble, d2 * paramDouble);
        }
        localw.f();
      }
    } while (!bool);
  }
  
  private double D()
  {
    int i = e.M;
    boolean bool = e.L;
    double d1 = 0.0D;
    a.c.w localw = this.w.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      double d2 = this.w.m(locale);
      double d3 = this.w.n(locale);
      if (i == 0)
      {
        if (bool) {
          break label100;
        }
        d1 = Math.max(d1, Math.sqrt(d2 * d2 + d3 * d3));
        localw.f();
      }
    } while (!bool);
    label100:
    return d1;
  }
  
  private void a(double paramDouble1, double paramDouble2)
  {
    int i = e.M;
    boolean bool = e.L;
    a.c.bb localbb = new a.c.bb();
    a.c.w localw = this.w.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      double d1 = this.w.m(locale);
      double d2 = this.w.n(locale);
      double d3 = Math.sqrt(d1 * d1 + d2 * d2);
      if ((i == 0) && (bool)) {
        return;
      }
      if (i == 0) {
        if (d3 >= paramDouble1 - paramDouble2) {
          this.O.a(locale, true);
        }
      }
      if (i == 0)
      {
        if (this.O.getBool(locale)) {
          localbb.add(locale);
        }
        localw.f();
      }
    } while (!bool);
    a.i.l.a(localbb, new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        int i = e.M;
        a.c.e locale1 = (a.c.e)paramAnonymousObject1;
        a.c.e locale2 = (a.c.e)paramAnonymousObject2;
        double d1 = Math.atan2(f.this.w.n(locale1), f.this.w.m(locale1));
        double d2 = Math.atan2(f.this.w.n(locale2), f.this.w.m(locale2));
        if (i == 0) {
          if (d1 < d2) {
            return -1;
          }
        }
        if (i == 0) {
          if (d1 > d2) {
            return 1;
          }
        }
        return 0;
      }
    });
    if (i == 0) {
      this.W = localbb;
    }
  }
  
  void c(a.c.w paramw, double paramDouble)
  {
    int i = e.M;
    this.O = this.w.B();
    this.U = new a.c.bb(paramw);
    a.f.g.a.d locald = new a.f.g.a.d(false);
    a.f.g.a.o localo = new a.f.g.a.o();
    locald.a(localo);
    locald.i(true);
    locald.a(new c_());
    locald.a(new g_());
    this.S = this.w.j();
    if (i == 0)
    {
      if (!this.V)
      {
        a(8, this.S);
        if ((i != 0) || ((this.w.j() <= 8) || (this.w.j() <= this.W.size())))
        {
          d = 3.141592653589793D / this.w.j();
          a(d);
          super.c(this.U.l(), 0.0D);
          this.W = this.U;
          return;
        }
        double d = 3.141592653589793D / this.W.size();
        a(d);
        super.c(this.W.l(), 0.0D);
        F();
        a(locald, this.y, localo, this.y / Math.sqrt(this.w.j()));
        if (i != 0) {
          return;
        }
        if (!e.L) {}
      }
      else
      {
        a(locald, localo);
      }
    }
    else {
      a(locald, this.y, localo, this.y / Math.sqrt(this.w.j()));
    }
    this.w.a(this.O);
  }
  
  void F()
  {
    int i = e.M;
    boolean bool = e.L;
    a.c.w localw = this.w.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      a.c.e locale = localw.d();
      if (i == 0)
      {
        if (!this.O.getBool(locale)) {
          this.w.a(locale, 0.0D, 0.0D);
        }
        localw.f();
      }
    } while (!bool);
  }
  
  private void G()
  {
    int i = e.M;
    boolean bool = e.L;
    a.d.w localw = b(this.w.v());
    double d1 = 0.0D;
    double d2 = 0.0D;
    double d3 = this.w.j();
    a.c.w localw1 = this.w.v();
    do
    {
      if (!localw1.e()) {
        break;
      }
      a.c.e locale1 = localw1.d();
      d5 = localw.a(this.w.o(locale1));
      d1 += d5;
      if (i == 0)
      {
        if (bool) {
          break label126;
        }
        d2 += d5 * d5;
        localw1.f();
      }
    } while (!bool);
    if (i == 0) {}
    label126:
    double d4 = d1 / d3;
    double d5 = (d3 * d2 - d1 * d1) / (d3 * (d3 - 1.0D));
    if (i == 0) {
      if (d5 < 0.0D) {
        d5 = 0.0D;
      }
    }
    double d6 = Math.sqrt(d5);
    a.c.bb localbb1 = new a.c.bb();
    if (d6 > 0.1D)
    {
      localObject1 = this.w.v();
      label278:
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.w)localObject1).d();
        double d7 = localw.a(this.w.o((a.c.e)localObject2));
        if (i == 0) {
          if (d7 >= d4 - 2.0D * d6)
          {
            if (i != 0) {
              continue;
            }
            if (d7 <= d4 + 2.0D * d6) {
              break label278;
            }
          }
        }
        localbb1.add(localObject2);
        ((a.c.w)localObject1).f();
      } while (!bool);
    }
    Object localObject1 = new a.i.y(this.w);
    ((a.i.y)localObject1).a(localbb1);
    Object localObject2 = new j();
    ((j)localObject2).b(true);
    ((j)localObject2).a(localw);
    ((j)localObject2).a(this.O);
    ((j)localObject2).a(false);
    ((j)localObject2).b(d4);
    ((j)localObject2).a(d4);
    ((j)localObject2).b(true);
    ((j)localObject2).doLayout(this.w);
    a.c.bb localbb2 = ((j)localObject2).d();
    ((a.i.y)localObject1).g();
    localw = b(localbb2.l());
    d1 = 0.0D;
    d3 = localbb2.size();
    Object localObject3 = localbb2.l();
    double d8;
    do
    {
      if (!((a.c.w)localObject3).e()) {
        break;
      }
      localObject4 = ((a.c.w)localObject3).d();
      d8 = localw.a(this.w.o((a.c.e)localObject4));
      d1 += d8;
      if (i != 0) {
        break label493;
      }
      ((a.c.w)localObject3).f();
      if (bool) {
        break label486;
      }
    } while (!bool);
    if (i == 0) {
      d4 = d1 / d3;
    }
    label486:
    label493:
    localObject3 = this.w.v();
    do
    {
      if (!((a.c.w)localObject3).e()) {
        break;
      }
      localObject4 = ((a.c.w)localObject3).d();
      d8 = localw.a(this.w.o((a.c.e)localObject4));
      if ((i == 0) && (bool)) {
        break label672;
      }
      if (i == 0)
      {
        if (d8 >= d4 - this.D) {
          this.O.a(localObject4, true);
        }
        ((a.c.w)localObject3).f();
      }
    } while (!bool);
    if (i == 0) {
      if (i == 0)
      {
        if (this.Q != null)
        {
          localObject3 = this.Q.iterator();
          do
          {
            if (!((Iterator)localObject3).hasNext()) {
              break;
            }
            localObject4 = (a.c.e)((Iterator)localObject3).next();
            if (i != 0) {
              break label673;
            }
            this.O.a(localObject4, true);
            if (bool) {
              break label672;
            }
          } while (!bool);
        }
        if (i != 0) {}
      }
      else
      {
        this.W = new a.c.bb();
      }
    }
    label672:
    label673:
    localObject3 = y();
    if (i == 0)
    {
      if ((localObject3 instanceof e.a_)) {
        ((e.a_)localObject3).a(new a.d.w(localw.a(), localw.b()));
      }
      this.U = new a.c.bb(((a.a.y)localObject3).a(this.w));
    }
    Object localObject4 = this.U.l();
    do
    {
      if (!((a.c.w)localObject4).e()) {
        break;
      }
      a.c.e locale2 = ((a.c.w)localObject4).d();
      if (i == 0)
      {
        if (this.O.getBool(locale2)) {
          this.W.b(locale2);
        }
        ((a.c.w)localObject4).f();
      }
    } while (!bool);
  }
  
  private a.d.w H()
  {
    Rectangle2D localRectangle2D = wc.a(this.w, this.w.v());
    return new a.d.w(localRectangle2D.getCenterX(), localRectangle2D.getCenterY());
  }
  
  private a.d.w b(a.c.w paramw)
  {
    int i = e.M;
    boolean bool = e.L;
    double d1 = 0.0D;
    double d2 = 0.0D;
    paramw.h();
    do
    {
      if (!paramw.e()) {
        break;
      }
      a.c.e locale = paramw.d();
      d1 += this.w.m(locale);
      d2 += this.w.n(locale);
      paramw.f();
      if ((i == 0) && (bool)) {
        break label112;
      }
    } while (!bool);
    d1 /= paramw.k();
    if (i == 0) {
      d2 /= paramw.k();
    }
    label112:
    return new a.d.w(d1, d2);
  }
  
  class f_
    implements bc
  {
    private double a;
    private double b;
    
    f_() {}
    
    public double a()
    {
      return this.a;
    }
    
    public void a(double paramDouble)
    {
      this.a = paramDouble;
    }
    
    public double b()
    {
      return this.b;
    }
    
    public void b(double paramDouble)
    {
      this.b = paramDouble;
    }
    
    public void a(a.f.g.a.bb parambb, xb paramxb)
    {
      int i = e.M;
      boolean bool = e.L;
      a.f.o localo = paramxb.m();
      if (localo.j() - f.this.W.size() <= 0) {
        return;
      }
      double d1 = 0.0D;
      double d2 = 1.0D / paramxb.i();
      a.c.w localw1 = localo.v();
      do
      {
        if (!localw1.e()) {
          break;
        }
        a.c.e locale1 = localw1.d();
        if (bool) {
          break label174;
        }
        if (i == 0)
        {
          if (!f.this.O.getBool(locale1))
          {
            d4 = paramxb.a(locale1).g() * d2;
            d1 += f.this.P.getDouble(locale1) * d4;
          }
          localw1.f();
        }
      } while (!bool);
      if (i == 0) {
        d1 /= (localo.j() - f.this.W.size());
      }
      label174:
      double d3 = this.a;
      double d4 = 1.0D - parambb.c();
      double d5 = this.a * d1 * d4;
      if ((i != 0) || ((d1 != 0.0D) && ((i != 0) || (d5 >= d3))))
      {
        double d6 = this.b;
        this.b += d5;
        f.this.R.b(this.b);
        double d7 = this.b / d6;
        a.c.w localw2 = f.this.W.l();
        do
        {
          if (!localw2.e()) {
            break;
          }
          a.c.e locale2 = localw2.d();
          xb.a_ locala_ = paramxb.d(locale2);
          double d8 = locala_.b() * d7;
          double d9 = locala_.c() * d7;
          locala_.a(d8, d9, 0.0D);
          localw2.f();
        } while (!bool);
      }
    }
  }
  
  class h_
    extends kc
  {
    h_() {}
    
    public a.f.g.a.y a(cb paramcb, a.f.g.a.bb parambb, a.f.g.a.f paramf)
    {
      super.a(paramcb, parambb, paramf);
      f.this.P.a(paramcb.p(), paramf.c());
      return paramf;
    }
  }
  
  class g_
    implements bc
  {
    g_() {}
    
    public void a(a.f.g.a.bb parambb, xb paramxb)
    {
      boolean bool = e.L;
      a.c.w localw = f.this.W.l();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        paramxb.d(locale).f(1.0D);
        localw.f();
      } while (!bool);
    }
  }
  
  static class c_
    implements bc
  {
    public void a(a.f.g.a.bb parambb, xb paramxb)
    {
      boolean bool = e.L;
      a.f.o localo = paramxb.m();
      a.c.w localw = localo.v();
      do
      {
        if (!localw.e()) {
          break;
        }
        a.c.e locale = localw.d();
        paramxb.d(locale).h(Math.max(localo.s(locale), localo.t(locale)));
        localw.f();
      } while (!bool);
    }
  }
  
  static class b_
    implements p
  {
    private a.c.e a;
    private t b;
    
    b_(a.c.e parame, t paramt)
    {
      this.a = parame;
      this.b = paramt;
    }
    
    public a.c.e b()
    {
      return this.a;
    }
    
    public t a()
    {
      return this.b;
    }
  }
  
  class e_
  {
    a.c.e a;
    a.c.e c;
    
    e_(a.c.e parame1, a.c.e parame2)
    {
      this.a = parame1;
      this.c = parame2;
    }
    
    boolean a(double paramDouble)
    {
      int i = e.M;
      if (i == 0) {
        if (paramDouble > 0.0D)
        {
          double d = h.b(f.this.w.v(this.a), f.this.w.v(this.c));
          if (i == 0) {}
          return d < paramDouble;
        }
      }
      return t.a(f.this.w.v(this.a), f.this.w.v(this.c));
    }
  }
  
  class d_
    implements m.g_
  {
    private z a = new z();
    
    d_() {}
    
    public z a()
    {
      return this.a;
    }
    
    public void a(Object paramObject1, Object paramObject2)
    {
      f.b_ localb_1 = (f.b_)paramObject1;
      f.b_ localb_2 = (f.b_)paramObject2;
      this.a.add(new f.e_(f.this, localb_1.b(), localb_2.b()));
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.a.f

 * JD-Core Version:    0.7.0.1

 */